package com.sai.homework;

public class OnlinePackage implements Onlineservice {
    private int data;
    private double cost;

    public OnlinePackage() {
    }

    public OnlinePackage(int data, double cost) {
        setData(data);
        setCost(cost);
    }

    public int getData() {
        return data;
    }

    public void setData(int data) {
        this.data = data;
    }

    public double getCost() {
        return cost;
    }

    public void setCost(double cost) {
        this.cost = cost;
    }

    public void show() {
        System.out.println("套餐信息包括：上网流量为" + data + "MB,每月资费为" + cost + "元");
    }

    @Override
    public void show(int data, MobileCard mc) {
        setData(data);
        show();
        System.out.println("这里是重写的方法呀！");
    }
}
